<!DOCTYPE html>
<html>
<head>
<title>员工考勤管理</title>
#parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.year" @keyup.enter="query" placeholder="年份">
			</div>
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.mouth" @keyup.enter="query" placeholder="月">
			</div>
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.dept" @keyup.enter="query" placeholder="部门">
			</div>
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.empName" @keyup.enter="query" placeholder="姓名">
			</div>
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.company" @keyup.enter="query" placeholder="单位">
			</div>
			<div class="form-group col-sm-2">
				<select v-model="q.post" @keyup.enter="query" class="form-control" >
					<option v-for="post in dictList" :value="post.value">{{post.label}}</option>
				</select>
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			#if($shiro.hasPermission("employeeattendancemanagement:save"))
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			#end
			#if($shiro.hasPermission("employeeattendancemanagement:update"))
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			#end
			#if($shiro.hasPermission("employeeattendancemanagement:delete"))
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			#end
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
											<div class="form-group">
			   	<div class="col-sm-1 control-label">员工姓名</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" readonly="readonly"  @click="popUser"  v-model="employeeAttendanceManagement.empName" placeholder="请选择"/>
			    </div>
				<div class="col-sm-1 control-label">身份证</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" readonly="readonly" v-model="employeeAttendanceManagement.idno" placeholder="身份证"/>
				</div>
			</div>

									<div class="form-group">
			   	<div class="col-sm-1 control-label">部门</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" readonly="readonly" v-model="employeeAttendanceManagement.dept" placeholder="部门"/>
			    </div>

				<div class="col-sm-1 control-label">岗位</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" readonly="readonly"  v-model="employeeAttendanceManagement.post" placeholder="岗位"/>
				</div>
			</div>


									<div class="form-group">
			   	<div class="col-sm-1 control-label">年</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control"  v-model="employeeAttendanceManagement.year" placeholder="年"/>
			    </div>

				<div class="col-sm-1 control-label">月</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" v-model="employeeAttendanceManagement.mouth" placeholder="月"/>
				</div>
			</div>

									<div class="form-group">
			   	<div class="col-sm-1 control-label">出勤天数</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="employeeAttendanceManagement.attendanceDays" placeholder="出勤天数"/>
			    </div>

				<div class="col-sm-1 control-label">年休天数</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" v-model="employeeAttendanceManagement.annualLeaveDays" placeholder="年休天数"/>
				</div>
			</div>

									<div class="form-group">
			   	<div class="col-sm-1 control-label">事假天数</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="employeeAttendanceManagement.compassionateLeaveDays" placeholder="事假天数"/>
			    </div>

				<div class="col-sm-1 control-label">婚假天数</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" v-model="employeeAttendanceManagement.marriageHolidayDays" placeholder="婚假天数"/>
				</div>
			</div>

									<div class="form-group">
			   	<div class="col-sm-1 control-label">病假天数</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="employeeAttendanceManagement.sickLeaveDays" placeholder="病假天数"/>
			    </div>

				<div class="col-sm-1 control-label">丧假天数</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" v-model="employeeAttendanceManagement.funeralDays" placeholder="丧假天数"/>
				</div>
			</div>

									<div class="form-group">
			   	<div class="col-sm-1 control-label">产假天数</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="employeeAttendanceManagement.maternityLeaveDays" placeholder="产假天数"/>
			    </div>

				<div class="col-sm-1 control-label">调休天数</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" v-model="employeeAttendanceManagement.takeOffDays" placeholder="调休天数"/>
				</div>
			</div>

							<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>


<!-- 弹出框 -->
<div id="popLayer" style="display: none;padding:10px;">
	<table id="popGrid"></table>
	<div id="popGridPager"></div>
	<!--<ul id="menuTree" class="ztree"></ul>-->
</div>


<!-- 弹出选择用户 -->
<div id="popUser" style="display: none;padding:10px;">
	<form id="formSearch" class="form-horizontal">
		<div class="form-group" >
			<label class="control-label col-sm-1" style="width: 120px" for="popUser_name">姓名 </label>
			<div class="col-sm-2">
				<input type="text" class="form-control" id="popUser_name">
			</div>
			<div class="col-sm-1" style="text-align:center;">
				<button type="button"  id="find_btn" @click="searchByName" class="btn btn-primary">查询</button>
			</div>
		</div>
	</form>
	<table id="popUserGrid"></table>
	<div id="popUserGridPager"></div>
</div>

<script src="${rc.contextPath}/js/hr/employeeattendancemanagement.js?_${date.systemTime}"></script>
</body>
</html>